<template>
	<view>
		<scroll-view class="scroll-view" scroll-y="true" :style="'height:'+scriptHeight+'px'">
		<view class="content">
			<view class="title">{{info[0]}}</view>
			<view class="view-text">{{info[1]}}</view>
			<view class="view-text">{{info[2]}}</view>
			<view class="view-text">{{info[3]}}</view>
			<view class="view-text">{{info[4]}}</view>
			<view class="view-text">{{info[5]}}</view>
			<view class="view-text last">{{info[6]}}</view>
		</view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				'info':"",
				'id':0,
				'scriptHeight':400,
			}
		},
		onReady() {
			this.scriptHeight = uni.getSystemInfoSync().windowHeight;
		},
		onLoad(option) {
			this.id = option.id;
			let that = this;
			uni.request({
				url: that.websiteUrl+'/articlecy',
				method:'GET',
				header: {
				        'x-requested-with': 'xmlhttprequest' //自定义请求头信息
				    },
				data:{
					'id':that.id,
				},
				success:(res)=>{
					if(res.data.code != 1){
						uni.showToast({
							title:"网络错误！",
							duration:2000,
							icon:'none',
						})
					} else {
						that.info = res.data.data;
						// console.log(that.info);
					}
				}
			})
		},
		methods: {
			
		}
	}
</script>

<style lang="scss">
.scroll-view{
	height: 450px;
	background-color: $uni-bg-color;
	.content{
		background-color: $uni-bg-color;
		font-size: 15px;
		
		color:$uni-text-color;
		.title{
			font-weight: bold;
			margin-top: 20px;
			display: flex;
			justify-content: center;
			align-items: center;
			height:30px;
			font-size: 15px;
		}
		.view-text{
			// height: 30px;
			margin: 10px;
			
		}
		
	}
}
</style>
